package com.somiz.main;

import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

import com.somiz.admin.AdminDao;
import com.somiz.admin.AdminFenCreer;
import com.somiz.admin.AdminFenLogger;
import com.somiz.admin.AdminForm;
import com.somiz.affectation.AffectationDao;
import com.somiz.affectation.AffectationForm;
import com.somiz.affectation.AffectationPanListe;
import com.somiz.article.ArticleDao;
import com.somiz.article.ArticleForm;
import com.somiz.article.ArticlePanListe;
import com.somiz.famille.FamilleDao;
import com.somiz.famille.FamilleForm;
import com.somiz.fournisseur.FournisseurDao;
import com.somiz.fournisseur.FournisseurForm;
import com.somiz.fournisseur.FournisseurPanListe;
import com.somiz.gamme.GammeDao;
import com.somiz.gamme.GammeForm;
import com.somiz.marque.MarqueDao;
import com.somiz.marque.MarqueForm;
import com.somiz.reforme.ReformeDao;
import com.somiz.reforme.ReformeForm;
import com.somiz.reforme.ReformePanListe;
import com.somiz.reparation.ReparationDao;
import com.somiz.reparation.ReparationForm;
import com.somiz.reparation.ReparationPanListe;
import com.somiz.reparationExt.RepExtDao;
import com.somiz.structure.StructureDao;
import com.somiz.structure.StructureForm;
import com.somiz.structure.StructurePanListe;
import com.somiz.utilisateur.UtilisateurDao;
import com.somiz.utilisateur.UtilisateurForm;
import com.somiz.utilisateur.UtilisateurPanListe;

public class Control {
	private static Long adminId;
	private static AdminDao adminDao = (AdminDao) (new XmlBeanFactory(
			new ClassPathResource("config.xml"))).getBean("AdminDao");
	private static AffectationDao affectationDao = (AffectationDao) (new XmlBeanFactory(
			new ClassPathResource("config.xml"))).getBean("AffectationDao");
	private static ArticleDao articleDao = (ArticleDao) (new XmlBeanFactory(
			new ClassPathResource("config.xml"))).getBean("ArticleDao");
	private static FamilleDao familleDao = (FamilleDao) (new XmlBeanFactory(
			new ClassPathResource("config.xml"))).getBean("FamilleDao");
	private static FournisseurDao fournisseurDao = (FournisseurDao) (new XmlBeanFactory(
			new ClassPathResource("config.xml"))).getBean("FournisseurDao");
	private static GammeDao gammeDao = (GammeDao) (new XmlBeanFactory(
			new ClassPathResource("config.xml"))).getBean("GammeDao");
	private static MarqueDao marqueDao = (MarqueDao) (new XmlBeanFactory(
			new ClassPathResource("config.xml"))).getBean("MarqueDao");
	private static ReformeDao reformeDao = (ReformeDao) (new XmlBeanFactory(
			new ClassPathResource("config.xml"))).getBean("ReformeDao");
	private static ReparationDao reparationDao = (ReparationDao) (new XmlBeanFactory(
			new ClassPathResource("config.xml"))).getBean("ReparationDao");
	private static RepExtDao repExtDao = (RepExtDao) (new XmlBeanFactory(
			new ClassPathResource("config.xml"))).getBean("RepExtDao");
	private static StructureDao structureDao = (StructureDao) (new XmlBeanFactory(
			new ClassPathResource("config.xml"))).getBean("StructureDao");
	private static UtilisateurDao utilisateurDao = (UtilisateurDao) (new XmlBeanFactory(
			new ClassPathResource("config.xml"))).getBean("UtilisateurDao");
	private static Principal principal;
	private static AdminFenLogger adminFenLogger;
	private static AdminFenCreer adminFenCreer;
	private static AdminForm adminForm;
	private static MarqueForm marqueForm;
	private static GammeForm gammeForm;
	private static FamilleForm familleForm;
	private static StructureForm structureForm;
	private static UtilisateurForm utilisateurForm;
	private static FournisseurForm fournisseurForm;
	private static ArticleForm articleForm;
	private static AffectationForm affectationForm;
	private static ReformeForm reformeForm;
	private static ReparationForm reparationForm;
	private static ArticlePanListe articlePanListe;
	private static ReparationPanListe reparationPanListe;
	private static FournisseurPanListe fournisseurPanListe;
	private static StructurePanListe structurePanListe;
	private static UtilisateurPanListe utilisateurPanListe;
	private static AffectationPanListe affectationPanListe;
	private static ReformePanListe reformePanListe;

	public Control() {
		adminFenLogger = new AdminFenLogger();
		adminFenLogger.setVisible(true);
		principal = new Principal();
		adminFenCreer = new AdminFenCreer(adminFenLogger);
		adminForm = new AdminForm();
		marqueForm = new MarqueForm();
		gammeForm = new GammeForm();
		structureForm = new StructureForm();
		utilisateurForm = new UtilisateurForm();
		familleForm = new FamilleForm();
		fournisseurForm = new FournisseurForm();
		articleForm = new ArticleForm();
		affectationForm = new AffectationForm();
		reformeForm = new ReformeForm();
		reparationForm = new ReparationForm();
		articlePanListe = new ArticlePanListe();
		reparationPanListe = new ReparationPanListe();
		fournisseurPanListe = new FournisseurPanListe();
		structurePanListe = new StructurePanListe();
		utilisateurPanListe = new UtilisateurPanListe();
		affectationPanListe = new AffectationPanListe();
		reformePanListe = new ReformePanListe();
	}

	public static AdminDao getAdminDao() {
		return adminDao;
	}

	public static final StructurePanListe getStructurePanListe() {
		return structurePanListe;
	}

	public static final AffectationPanListe getAffectationPanListe() {
		return affectationPanListe;
	}

	public static final ReformePanListe getReformePanListe() {
		return reformePanListe;
	}

	public static final void setReformePanListe(ReformePanListe reformePanListe) {
		Control.reformePanListe = reformePanListe;
	}

	public static final void setAffectationPanListe(
			AffectationPanListe affectationPanListe) {
		Control.affectationPanListe = affectationPanListe;
	}

	public static final UtilisateurPanListe getUtilisateurPanListe() {
		return utilisateurPanListe;
	}

	public static final void setUtilisateurPanListe(
			UtilisateurPanListe utilisateurPanListe) {
		Control.utilisateurPanListe = utilisateurPanListe;
	}

	public static final void setStructurePanListe(
			StructurePanListe structurePanListe) {
		Control.structurePanListe = structurePanListe;
	}

	public static ReparationPanListe getReparationPanListe() {
		return reparationPanListe;
	}

	public static void setReparationPanListe(
			ReparationPanListe reparationPanListe) {
		Control.reparationPanListe = reparationPanListe;
	}

	public static ArticlePanListe getArticlePanListe() {
		return articlePanListe;
	}

	public static void setArticlePanListe(ArticlePanListe articlePanListe) {
		Control.articlePanListe = articlePanListe;
	}

	public static ReparationForm getReparationForm() {
		return reparationForm;
	}

	public static void setReparationForm(ReparationForm reparationForm) {
		Control.reparationForm = reparationForm;
	}

	public static ReformeForm getReformeForm() {
		return reformeForm;
	}

	public static void setReformeForm(ReformeForm reformeForm) {
		Control.reformeForm = reformeForm;
	}

	public static FamilleForm getFamilleForm() {
		return familleForm;
	}

	public static ArticleForm getArticleForm() {
		return articleForm;
	}

	public static void setArticleForm(ArticleForm articleForm) {
		Control.articleForm = articleForm;
	}

	public static AffectationForm getAffectationForm() {
		return affectationForm;
	}

	public static void setAffectationForm(AffectationForm affectationForm) {
		Control.affectationForm = affectationForm;
	}

	public static void setFamilleForm(FamilleForm familleForm) {
		Control.familleForm = familleForm;
	}

	public static UtilisateurForm getUtilisateurForm() {
		return utilisateurForm;
	}

	public static FournisseurForm getFournisseurForm() {
		return fournisseurForm;
	}

	public static void setFournisseurForm(FournisseurForm fournisseurForm) {
		Control.fournisseurForm = fournisseurForm;
	}

	public static void setUtilisateurForm(UtilisateurForm utilisateurForm) {
		Control.utilisateurForm = utilisateurForm;
	}

	public static GammeForm getGammeForm() {
		return gammeForm;
	}

	public static StructureForm getStructureForm() {
		return structureForm;
	}

	public static void setStructureForm(StructureForm structureForm) {
		Control.structureForm = structureForm;
	}

	public static void setGammeForm(GammeForm gammeForm) {
		Control.gammeForm = gammeForm;
	}

	public static MarqueForm getMarqueForm() {
		return marqueForm;
	}

	public static void setMarqueForm(MarqueForm marqueForm) {
		Control.marqueForm = marqueForm;
	}

	public static void setAdminDao(AdminDao adminDao) {
		Control.adminDao = adminDao;
	}

	public static AdminForm getAdminForm() {
		return adminForm;
	}

	public static void setAdminForm(AdminForm adminForm) {
		Control.adminForm = adminForm;
	}

	public static AdminFenCreer getAdminFenCreer() {
		return adminFenCreer;
	}

	public static void setAdminFenCreer(AdminFenCreer adminFenCreer) {
		Control.adminFenCreer = adminFenCreer;
	}

	public static final FournisseurPanListe getFournisseurPanListe() {
		return fournisseurPanListe;
	}

	public static final void setFournisseurPanListe(
			FournisseurPanListe fournisseurPanListe) {
		Control.fournisseurPanListe = fournisseurPanListe;
	}

	public static Principal getPrincipal() {
		return principal;
	}

	public static void setPrincipal(Principal principal) {
		Control.principal = principal;
	}

	public static AdminFenLogger getAdminFenLogger() {
		return adminFenLogger;
	}

	public static void setAdminFenLogger(AdminFenLogger adminFenLogger) {
		Control.adminFenLogger = adminFenLogger;
	}

	public static AffectationDao getAffectationDao() {
		return affectationDao;
	}

	public static void setAffectationDao(AffectationDao affectationDao) {
		Control.affectationDao = affectationDao;
	}

	public static ArticleDao getArticleDao() {
		return articleDao;
	}

	public static void setArticleDao(ArticleDao articleDao) {
		Control.articleDao = articleDao;
	}

	public static FamilleDao getFamilleDao() {
		return familleDao;
	}

	public static void setFamilleDao(FamilleDao familleDao) {
		Control.familleDao = familleDao;
	}

	public static FournisseurDao getFournisseurDao() {
		return fournisseurDao;
	}

	public static void setFournisseurDao(FournisseurDao fournisseurDao) {
		Control.fournisseurDao = fournisseurDao;
	}

	public static GammeDao getGammeDao() {
		return gammeDao;
	}

	public static void setGammeDao(GammeDao gammeDao) {
		Control.gammeDao = gammeDao;
	}

	public static MarqueDao getMarqueDao() {
		return marqueDao;
	}

	public static void setMarqueDao(MarqueDao marqueDao) {
		Control.marqueDao = marqueDao;
	}

	public static ReformeDao getReformeDao() {
		return reformeDao;
	}

	public static void setReformeDao(ReformeDao reformeDao) {
		Control.reformeDao = reformeDao;
	}

	public static ReparationDao getReparationDao() {
		return reparationDao;
	}

	public static void setReparationDao(ReparationDao reparationDao) {
		Control.reparationDao = reparationDao;
	}

	public static RepExtDao getRepExtDao() {
		return repExtDao;
	}

	public static void setRepExtDao(RepExtDao repExtDao) {
		Control.repExtDao = repExtDao;
	}

	public static StructureDao getStructureDao() {
		return structureDao;
	}

	public static void setStructureDao(StructureDao structureDao) {
		Control.structureDao = structureDao;
	}

	public static UtilisateurDao getUtilisateurDao() {
		return utilisateurDao;
	}

	public static void setUtilisateurDao(UtilisateurDao utilisateurDao) {
		Control.utilisateurDao = utilisateurDao;
	}

	public static Long getAdminId() {
		return adminId;
	}

	public static void setAdminId(Long adminId) {
		Control.adminId = adminId;
	}

}
